package com.furnitur.modules.admin.controller.system;

import com.furnitur.common.api.CommonResult;
import com.furnitur.core.service.StatisticsService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController

@RequestMapping("/statistics")
public class StatisticsController {

    @Autowired
    private StatisticsService statisticsService;


    @GetMapping
    public CommonResult<Map<String, Object>> getStatistics() {
        Map<String, Object> statistics = statisticsService.getStatistics();
        return CommonResult.success(statistics);
    }
}
